package datastruct

//队列

type Queue struct {
	list []int
}

func NewQueue()*Queue  {
	return &Queue{list:[]int{}}
}

func (this *Queue)Add(nums []int)  {
	if this == nil{
		return
	}
	this.list = append(this.list, nums...)
}

func (this *Queue)Pop()  (bool,int){
	if len(this.list) == 0{
		return false,0
	}
	res := this.list[0]
	this.list = this.list[1:]

	return true,res
}
func (this *Queue)Empty() bool {
	if len(this.list) == 0{
		return true
	}else{
		return false
	}

}